package com.rong.tools.mappers;

import com.rong.tools.entity.dto.ToolDto;
import com.rong.tools.entity.pojo.Tool;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 周厚荣
 * @date 2025/4/20 23:24
 */
@Mapper
public interface ToolMapper {
    List<Tool> selectAllTools();
    Tool selectToolById(@Param("tid") Integer tid);
    List<Tool> selectToolByCategory(@Param("cid") Integer cid);
    int insertTool(Tool tool);
    int updateTool(Tool tool);
    int deleteTool(@Param("tid") Integer tid);
    List<ToolDto> selectAllToolsWithCategoryName();
    List<Tool> search(@Param("keyword") String keyword);
}
